using Nop.Services.Localization;
using Spotshub.Api.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using FluentValidation;

namespace Spotshub.Api.Validators
{
	public class ContactUsValidator : AbstractValidator<ContactUsModel>
	{
		public ContactUsValidator(ILocalizationService localizationService)
		{
			RuleFor(x => x.Email).NotEmpty().WithMessage(localizationService.GetResource("ContactUs.Email.Required"));
			RuleFor(x => x.Email).EmailAddress().WithMessage(localizationService.GetResource("Common.WrongEmail"));
			RuleFor(x => x.FullName).NotEmpty().WithMessage(localizationService.GetResource("ContactUs.FullName.Required"));
			RuleFor(x => x.Enquiry).NotEmpty().WithMessage(localizationService.GetResource("ContactUs.Enquiry.Required"));
		}
	}
}